added tests and modified layers