Fixing subtroutine to return 1 which pbp best practice