cleaned up the code!