made code work with button input, but on unexpected pin