generalize Pack, add input and output keys, getters and setters
update test