added toString method and main class