Added initial code in accordance with requirements.