some refactoring to use require_relative in place of __FILE__