working on fixing the "real" implementation. cannot see the error