wrote and tested fredkins rule