Add end() method