add loading state and indicator