fixing untitled logic