added the refactor
added the rest of the refactor to make it correct in terms of imports