Implemented code and updated SQL file