refactor and cleanup -next  part