use local namespace
export rotate function
add tests for rotation and line segements, also use test handlers