wrote api & tests
first version