modify java and math