use const & and changed typo