added return code 100 checking