started rewriting connection model