add sql functionality