working version on cloud 9