now translating group instead of single elements
improved updateElements logic