Added new function to index.pup