Modified full process to work correctly