added number of path logic and some input