fixed warning and removed trailing whitespaces