changed some functions to visual