Monte-Carlo Simulation of Hard Spheres in a potential