implement prototype-based