removed print calls used for debugging.