adding new test + fixing bugs