moved javascript to external file