interaction with interface applied and made first version of trade algorithm