refatoring reading params