Refactor with better handleing of adj