return properly
fix digest

length() apparently does not work on arrays. sigh.