implemented basic fiar function