allow -1 for set head (reset)