Implemented times function