debug statement in reset
added F6 to restore window to previous dimension
adding call to calc_dimension in padrefresh otherwise sometimes when called directly