solving optimization problem using GA