turned other java into try statement