Modelling the uv/x-ray cosmic background with CUBA