added flash code