some conditionals and some style
fixing merge issues