typo
better error handling