now saves data to mysql