hooking button js into main