cleaned up some java solutions