added some functionalities... still a lot of issues