updated some routines