added rugged implementation