Stack builder
Minor change in pulse counter