moved onclick handlers to js