finished up the delegates. added some helper functions.