use function instead of vector for point determination