Added code and updated readme.