added warnings to the functions