add loading effect
pseudo code