converted to use params