moved some code around

Signed-off-by: DarkSnake-Kobra <jbttoms@gmail.com>