borrowed some badge and award code from osqa