made pop out animation more flexible