refactoring: extracted constants for return codes