first sketch, working if stats already defined