less comments, write counter between open and release