fixed repository stubs & finish allowance repo code -  not tested