fix warning
format and fix tests