added assign5fac.cpp