addHead method added