fixed #13

needs to be tested