Finishing up

Added all math, everything worked out. Now just polishing up assignment.