added checks for return requirements