initialization; error handling