changed pics to bytes and merged