added type to sql