add generic method for resolve