Making that method public doesn't make much sense and the syntax is incorrect, however the approach itself seems ok.