Working version of static version