Adding state functionality and params