added implicit error handling