created a helper function for mithril and got it to work.