updated to use local method for getting version code