fix bugs
add surface analysis