fixed bugs in surrounding method