bin calc working