started adding parameters to function