code that should work for both monomer and powder, no print statements