did some minor modification