use PRG design pattern