This seems like an XY problem, can you please tell us the problem that you have, instead of how to implement the solution that you came up with?