Following a Java tutorial from youtube credits to Derek Banas