refactored to use api
implemented browsable api