removed dead code
fixed failing tests