added a main() that checks the code in pack.c