adjust codes according to comments of Catalin