modified apex class