changed to be better with error message