added return code for the status check