finally fixed circular dependencies