1. fixing a bug in @izaazyunus's function. Fixed a bug which I created 2. little bit ux