move tests to test dir; writing models api methods