working! still need to clean up code and set up functions to push info back to database