refactor and add punchcard js