cleaned up DOT code