moved everything to functions