redesigned the set_style() function

Signed-off-by: huhamhire <me@huhamhire.com>