added cli for rotation and fixed find mask bug