added code and added to readme