added example for groupby, and fixed as_atom not throwing errors for long values