Revise using command from lpop to rpop