working fine with dynamic LI creation