fixed code according to comments and changed directory structure according to conventiojns