RelationHandler.java - merged with Dr.Cui changes