use pop and << for better readability and performance