added const for magic numbers; added code behind copy type