code refactoring, introduce some constants