added flash init callback