direction fuction test