fixed borked code