modify for better code style