modified fptd to take arbitrary target state