more complexity refactors