updated to have java interface