some modifications for lesst use