frontend tests and api implementation