removed hardcoded value for key length