Another attempt ... giving an error stack trace too deep issue