created core package and moved code to core