new profit calc func
resolve conflict