implement get_head