coded in jan-vitek changes