i regret i wrote this code influenced by some guys back then :)