Changed .top to .last for clearer semantics and consistency