added some functionallity. Atleast the code runs :)