! refactoring work in progress
! refactoring complete