remove debug
basic function and cleanup