added data attributes
added listeners to input
changed markup to be more intuitive for myself