refactoring prototypes