Tried to add functions... still very buggy.