updated with copy functionality