WIP: Reinserted old code to see if it works

Change-Id: Ie87e65a2f774c4f20166ec513a0078da8f6e2411