fixed search bug and added days support