updated code kinda