added regresson functionality