need to fix pin down logic