removed unnecessary def, renamed funcion parameter