fixed coding problem
added option for badge