manual moved to function