HP ends tough year on a high note