Refactoring to support an aggregate goal

Signed-off-by: sajith <sajithshn@gmail.com>