changed files structure and added some functionality