make a code simple
i tried not to use deprecated classes