now updateLayout seems to work properly, minor modifications in adding edges/nodes through objects