add frame-size option
fix factory method