I think your problem could solve using external libraries