added 2nd part of sgbdor