made changes to pin controller