renamed parameters and added a few helpers.