fixed bug, extended test