finished all logic