small refactoring, using Point instead of induvidual x and y variables