moved helpers definition from routes to controllers