version 2: with java script step by step loading