reworked api and started on button