remove bed code