updated beamer code