adding checks and inserting row to lover tables