added edge-detecting pointsList creating subroutine.