allow -1 as a magic number