added prelude and main function to stack