some (minor) changes to real code