add errors for before function usage. no help yet