fix for SyntaxError: cannot return a value from a constructor