modified for fanr