new refseq.bed file and problem with ifelse from R 3.0.2 is fixed. ifelse() function was not working as it used to work. Now it is fixed. also ifelse() functions replaced with if()else() control structures. thanks for that annoyance R.