better usage and error handling