changed from flatten contact array to full stack array
fixed some wrong keys and changed handling