add actionCode sub routine
various minor bugs fix