cleaned up source code