added ror function