Some java code I've Written