Partially integrated code

Partially integrated code