very sketchy attempt to remember some Java from Uni dats