cool shell and java optimize