updated so it saves to database and prints to console on save