adding somewhat broken code