button now working for dot and dash, need to make it into a compact funciton or more clear code less mess