fix namespace
complete rewrite needed