removed redundant class declaration
fixed bugs