replaced end in helper