implemented most of the methods .. still buggy