updated code for dst problems