setHead method added