completed v1 and added basic tests