Changed to work with version 1.5 of java