make it pure java