perfect base framwork code