miscellaneous programming exercises