moved js to external file, polished questions