added function to set start values and some other small modifications