implemented prototype chain