-added error message handling
-added more button functions
-added utility functions