main updated, northwest and  minimum cost methods working