added parsing function for params