declaring err codes as extern