refactoring. need not to define each time.