modified for bug