Deleted helperfunctions. Not used anymore.