fixing functions according to new parameters