whoops, should be WIDTH - 1 and HEIGHT - 1