some error handling and validation @danielatdigital @dahernan