some code during learing apue3