made internal class package private
using a function instead of a supplier as accessdenied handler