added improved syntax and comments
better filtering for relation graph