modified for furhter code