work-version 1

all main function, ready to test diagramms