fixed broken code