make modules for nested relations
implement basic functionality for nested relations