separate style and script, implement multiple frames