added more strict requirements for code compatibility