separate db operation from logic
separate creating answer from error handling
fixing status code for different event
fixing some magic number and additional comment