add rectangle class
fix matrices rotation