added form and redraw function for user input of parameters
fixed a bug in caching logic