write generic function for multiple as well as single bookmarking(front-end)