improve waste and factory functionality