fix brackets behaviour & modify toXX into asXX