styles and functions improved