some code rework to fit bootstrap style