flesh out api and some views