Implementing index server side code