getpoints added for reading out coordinates