using constants instead of straight passing response codes in method call