added groupid and fixed bug with timestamp