Code written for Rackspace developer test