refactor complete more testing reqd
refactor complete