extended method as callback exercise - added constructor functions & prototype