sorting out few glitches