Tests

tests implemented. still branch coverage needed