made virtual functions pure virtual.
fixed parameter types and constness