Added Lukata's code - have yet to integrate