UPdated with possible stack errors