added SQL to registration