Extracted adt out of main