begin chapter1 and fucntion design