changed parameters to more be more effective