refactor to flashq package