removed unused code, updated parameters name