renamed some and added tests