refactoring and moved mislocated source file