fixed some variable names
changed parameters to interfaces