got rid of IS_AI and IS_NOT_AI constants