moved scope of variables
header comments of user code display