Agency controller

finished and tested agency controller in flask app!