sync with sinatra_template