fix some bugs. Add survey capabilities

Signed-off-by: Roger Manich <roger.manich@gmail.com>