tidied up. now uses ng-init and a $watch too.