Can now add params - still needs a bit of cleanup though