refactoring: add annotations and remove useless check