fixed alignment; simplified transformation