copied code and added directions