added state drawing