added new test + minor tweaks