Added the delegate functions