updates api
changes structure
fixes style