replacing classes in parameters and return types by interfaces