moved params to own method