Add randomPoint function