updated code and pre styles