added Greyd_state to increase readability in connection module