made changes and fixed small mode