first version powder/monomer code that needs to be tested for bugs, but works for now