code works for powder also