made dynamic classes compatible with previous java versions
merge