followed cash's solution for 07