fixed item generation bugs, implemented proper item -> tail pushing