made subroutines protected