Added the function

Signed-off-by: Oleg Komarov <o.komarov11@imperial.ac.uk>