changed accept() to accept() const