updated to follow new compiler rules