added some tests
implemented basic behavior