Updated to use params object