Code for the sharevalue homework