curve fitting added