attempted fixes not working, need to fix java casting issue