fixed the re-rendering and load order problem
refactored the code and updated the specs