Basic solution to hw5