Changed from struct to class because of technical problems with struct