updated code snipits