Added parameters to function