found a silly mistake, so I added some tests