added dimension method to class Point