removed delete head check in pop methods and changed old_tail/head name to temp