this is homework 4 for SaaS course Fall 2013