refactoring make and tests