Added total cost to assignment method
finished tests