overhaul repository.jl to use updated api