remove js logic from html to app js