server code and handlers added