started implementation of nested joins
Implemented path finding for references

but nested join implementation still does not work
implemented nested join logic