some little optimizes