copy and clear moved to protected instead of public