moving function from here to shortcodes(makes more sense to me)