Added create plan logic