finished estimate gaussian function