added HTTP Error Codes
separate content logic code from routes