adding function to options menu