lua is 1 based instead of 0 based... yech