improved for #3