diff --git a/userprog/populate_stack.c b/userprog/populate_stack.c
index 67438b57dbfb8021666518d519919c34946f3ff9..7be8c7d7dea7db812001e3708cba738bfc6e3f09 100644
--- a/userprog/populate_stack.c
+++ b/userprog/populate_stack.c
@@ -8,6 +8,10 @@
 #include "threads/vaddr.h"
 #include "userprog/argument_parsing.h"
 
+ // Adds the move value to the stack pointer
+static void move_stack_pointer(void** stack_pointer, int move_value) {
+	*stack_pointer = *stack_pointer + move_value;
+}
 
 void populate_stack(void** stack_pointer, int argc, char** argv) {
 	*stack_pointer = PHYS_BASE;
@@ -47,9 +51,4 @@ void populate_stack(void** stack_pointer, int argc, char** argv) {
 	move_stack_pointer(*stack_pointer, -4); //Moves the stack pointer back 4
 
 	(*(int *)(*stack_pointer)) = 0;
-}
-
-// Adds the move value to the stack pointer
-static void move_stack_pointer(void** stack_pointer, int move_value) {
-	*stack_pointer = *stack_pointer + move_value;
 }
\ No newline at end of file