Wrote some more functions