clean code in frame resource;