adding encryption support