used class to encapsulate, added the visual distribution