"fixed" uptake bug by avoiding if statements + some minor beauty and performance changes