fixed, added a test