reverted changes from first commit in favor of the general solution.