Updated to receive details hash