added method to check if number is multiple of three