Backward compatibility added

Backward compatibility for API 7 and above