fix, added some tests