using sinatra private function