Added enum for return codes