replaced deprecated types with new conditionals