slightly modify for personal project