fixed a few bugs and added some more param options