adding more functions and hacking around with things
hooray, eliminated much hackiness and added goodfulness