learned some things about javascript port