first commit, implemented setBg, setState, getState