moved out inline javascript to a separate file