added map reduce functionality
Added testing script