added the third method, recuisive way to do left shift operations