fixed copy and added equals method