algebraicised some unit tests