center functionality working