add more states to sm + change state func arg to obj