set pins depending on string