cleaned up the new functions and GUI