move that fragment js out