some refactor in progress, nt working :)