Created interface and general logic