Add spin related logics & add pnotify function.