changed db connection and variable quote problem