fix some methods signature to be more TypeScript