added all the checks
completed assignment