main with added rotating