implemented most functionality
removed unnecessary lib