update callback system to use jquery's callbacks