Working form for bucketing. Should make it better dynamically and use classes