added database framework and also function framework