FIRST VERSION WITH DATABASE INSERTION. STILL PROBLEMS