some changes from Gilau