updated code - 1/7/2013 (2)