Thank you @rpetribu I actually took inspiration from other plugins out there, so not entirely my merit.