moved some code around
making some changes to the logic
more changes
init ng-grid