Added beautification function