finishing up class on dimension reduction