Edited some random functions so they actually work