Added a few helperfunctions