adding function to generate options