Added complete action. Finished main logic