added checks for compatibility