working with ajax, passed params from ajax call to function