Filter BP based on Membership Level

I found some code for s2membership and after reviewing the membership functions.php I tried to adapt the code.

I want only a specific membership group to dispaly on the BP members-loop.php at /members/ of my site.

1. Here's the function from Membership that I'm assuming calls the subscription name.

function current_user_on_subscription( $sub_id ) {
	$member = current_member();

	if ( !empty( $member ) ) {
		return $member->on_sub( $sub_id );
	} else {
		return false;

2. Here's what I have in my child-theme/buddypress/members/members-loop.php

<?php while ( bp_members() ) : bp_the_member(); ?>

<!--Only show certain role in member listing-->

<?php if (current_user_on_subscription($sub_id) == NeedyNerd ): ?>
The standard loop executes if the previous statement is true.
<php? endif; ?>
<php? endwhile; ?>

What I was expecting this to do was check the user, find out which sub they were on, return the name of the sub to the loop, compare the values, and parse the HTML or pass to the next user.

What it actually did was hide all my users regardless of the subscription they have. I even tried tweaking the == NeedyNerd to be in '' and "" I even looked in my database and found the subscription number was 5 and put the value as 5 and it's still empty

I'm not a programmer by any means but if I could get some insight that would be great.

Maybe I need to dump a variable before the endif; ?