javascript moved to the end