refactor before api and css work