cleaned code; added some dependencies