changes made to handle cyclic dependency error