Dev

optimizate the code with origin functions