Updated v1.0

Added main loop in program