Added new Cost Function