added if-statement for brightness part to check if brightness is
available