changes merged from perosnal project, delegates added, bug fixed, small additional functionality added