some new logic added
minor insert