added code and details