changed function to take radians as input