seperate source file for memory problem