logic as prototype functions of widget