updated code again