tidy up and add handler/route