updated to remove "Uncaught Error"