refining implementations of most classes