beginning on api stuff