def get_current_triplett(sequence, position, forward=True):
    """returns the triplett of the current position and the position within the triplett"""
    if not forward:
        sequence = sequence[::-1]
        position = len(sequence)-position-1
    triplett_position = position % 3
    start_of_triplett = int(position/3)*3
    triplett = sequence[start_of_triplett:start_of_triplett+3]
    return triplett, triplett_position