added if-statement