some java code for new feature