fix tape, add program functionality