test and autodraw function