added self subroutines