Approach 1. but terminated with error.
updated