separate from html file, for better strutrue