added an if tag and changed some style