add some code res from popcorn