core refactor, correct design pattern implemented