added centre and repel functions