Added hook to ap view