downcounter and few other improvements