cleaned up and fixed rake