finish rest api and fix app size