porting decorator to other files + fixing template errors