add mobile detection in index and main a conditional