just some small changes and added a test