refactorized used data() jquery for storing obj