added better code to presentation