move clustering in render()