cleaned rightshifting from code