Update with solution for the plain function warning. suggested by @marsi