Adding all functionality for final submission