added union/intersection code and quick annotation/reflection check