Adjusted and added tests