added return codes