Added preferences and evaluate expression
Modified pattern
Added Rate validation and Profit calculation