made setup API class independant of Activity