Added dictionary for parameters and changed comp calc