added removeRear
function name