updated code layout