added cost function, with dummy constants