example application written. Minor bugs corrected