added additional checks