Extract function to create point