removing public attributes and bug fixing