Stamford man charged with running a drug factory