working version. groups input by an assigned group number. Updated html, css