Added backwards comtability to java 5