optimizing the shift method further, its the most called function