code at 2014.12.12.0:41
coding for apue