Added function to call from app.