The influence of rare gas matrix on the electronic levels of isolated atoms