added few brs, tried debugging things