add and fix tests