now works when there is no errors